package com.fancy.learncenter.net;

import com.fancy.learncenter.common.MyApplication;
import com.fancy.learncenter.utils.SPUtils;
import com.fancy.learncenter.utils.Utils;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import okhttp3.RequestBody;
import retrofit2.Retrofit;
import rx.Subscription;

/**
 * Created by Hyy on 2016/9/29.
 */
public class HttpMehtod {

    private Retrofit retrofit;
    private static HttpMehtod instance;

    //构造方法私有
    private HttpMehtod() {
    }

    //获取单例
    public static HttpMehtod getInstance() {
        if (instance == null) {
            instance = new HttpMehtod();
        }
        return instance;
    }


    public void getYZM(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().sendSmsCode(map);
        subscibe(observable, ideaObserver);
    }

    public void register(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().register(map);
        subscibe(observable, ideaObserver);
    }

    public void findPwd(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().findPwd(map);
        subscibe(observable, ideaObserver);
    }

    public void login(Map map, IdeaObserver ideaObserver) {
        map.put("accid", MyApplication.getAnroidId());
        Observable observable = IdeaApi.getApiService().login(map);
        subscibe(observable, ideaObserver);
    }

    public void wxLogin(Map map, IdeaObserver ideaObserver) {
        map.put("accid", MyApplication.getAnroidId());
        Observable observable = IdeaApi.getApiService().wxLogin(map);
        subscibe(observable, ideaObserver);
    }


    public void homeData(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().homeDate(map);
        subscibe(observable, ideaObserver);
    }

    public void editPersonVita(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().editPersonVita(map);
        subscibe(observable, ideaObserver);
    }

    public void doIntension(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().doIntension(map);
        subscibe(observable, ideaObserver);
    }

    public void recieveResume(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().recieveResume(map);
        subscibe(observable, ideaObserver);
    }

    public void msgSystem(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().msgSystem(map);
        subscibe(observable, ideaObserver);
    }

    public void msgComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().msgComment(map);
        subscibe(observable, ideaObserver);
    }

    public void unReadComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().unReadComment(map);
        subscibe(observable, ideaObserver);
    }

    public void unReadCommentReply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().unReadCommentReply(map);
        subscibe(observable, ideaObserver);
    }

    public void commentReply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().commentReply(map);
        subscibe(observable, ideaObserver);
    }

    public void deliverResume(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().deliverResume(map);
        subscibe(observable, ideaObserver);
    }

    public void doEduExperience(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().doEduExperience(map);
        subscibe(observable, ideaObserver);
    }

    public void doWorkExperience(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().doWorkExperience(map);
        subscibe(observable, ideaObserver);
    }


    public void sign(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().sign(map);
        subscibe(observable, ideaObserver);
    }

    public void goodsList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().goodsList(map);
        subscibe(observable, ideaObserver);
    }

    public void baseDetail(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().baseDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void trainVedioList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoLists(map);
        subscibe(observable, ideaObserver);
    }

    public void materialVideoLists(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().materialVideoLists(map);
        subscibe(observable, ideaObserver);
    }

    public void videoListsDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoListsDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void videoDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void materialVideoDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().materialVideoDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void videoTop(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoTop(map);
        subscibe(observable, ideaObserver);
    }

    public void fancyVideoDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().fancyVideoDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void upDataApp(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().upDataApp(map);
        subscibe(observable, ideaObserver);
    }

    public void trainLiveVedioList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().trainLiveVedioList(map);
        subscibe(observable, ideaObserver);
    }

    public void trainApplyList(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().trainApplyList(map);
        subscibe(observable, ideaObserver);
    }

    public void myTrain(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().myTrain(map);
        subscibe(observable, ideaObserver);
    }

    public void myTrainApplyList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().myTrainApplyList(map);
        subscibe(observable, ideaObserver);
    }

    public void myHdApplyList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().myHdApplyList(map);
        subscibe(observable, ideaObserver);
    }

    public void bannerList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().bannerList(map);
        subscibe(observable, ideaObserver);
    }

    public void resumeIntension(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().resumeIntension(map);
        subscibe(observable, ideaObserver);
    }

    public void resumeInfo(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().resumeInfo(map);
        subscibe(observable, ideaObserver);
    }

    public void delEduExperience(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().delEduExperience(map);
        subscibe(observable, ideaObserver);
    }

    public void delWorkExperience(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().delWorkExperience(map);
        subscibe(observable, ideaObserver);
    }

    public void activityList(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().activityList(map);
        subscibe(observable, ideaObserver);
    }

    public void myActivity(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().myActivity(map);
        subscibe(observable, ideaObserver);
    }

    public void trainApplyDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().trainApplyDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void activityDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().activityDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void applyActivity(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().applyActivity(map);
        subscibe(observable, ideaObserver);
    }

    public void trainApply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().trainApply(map);
        subscibe(observable, ideaObserver);
    }

    public void TZList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().TZList(map);
        subscibe(observable, ideaObserver);
    }

    public void trainWDList(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().trainWDList(map);
        subscibe(observable, ideaObserver);
    }

    public void myFollowList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().myFollowList(map);
        subscibe(observable, ideaObserver);
    }

    public void followMyList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().followMyList(map);
        subscibe(observable, ideaObserver);
    }

    public void tZList(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().tZList(map);
        subscibe(observable, ideaObserver);
    }

    public void nearby(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().nearby(map);
        subscibe(observable, ideaObserver);
    }

    public void followList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().followList(map);
        subscibe(observable, ideaObserver);
    }

    public void trainWDDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().trainWDDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void goodsDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().goodsDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void allDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().allDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void wDComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().wDComment(map);
        subscibe(observable, ideaObserver);
    }

    public void updateUser(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().updateUser(map);
        subscibe(observable, ideaObserver);
    }

    public void tZDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().tZDetail(map);
        subscibe(observable, ideaObserver);
    }

    public void wDDetail(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().wDDetail(map);
        subscibe(observable, ideaObserver);
    }


    public void doSolve(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().doSolve(map);
        subscibe(observable, ideaObserver);
    }

    public void goodsComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().goodsComment(map);
        subscibe(observable, ideaObserver);
    }

    public void videoComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoComment(map);
        subscibe(observable, ideaObserver);
    }

    public void videoLifeComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoLifeComment(map);
        subscibe(observable, ideaObserver);
    }

    public void tZComment(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().tZComment(map);
        subscibe(observable, ideaObserver);
    }

    public void wDCommentReply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().wDCommentReply(map);
        subscibe(observable, ideaObserver);
    }

    public void videoLifeCommentReply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().videoLifeCommentReply(map);
        subscibe(observable, ideaObserver);
    }

    public void goodsCommentReply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().goodsCommentReply(map);
        subscibe(observable, ideaObserver);
    }

    public void tZCommentReply(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().tZCommentReply(map);
        subscibe(observable, ideaObserver);
    }

    public void unUserGoods(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().unUserGoods(map);
        subscibe(observable, ideaObserver);
    }

    public void myUserGoods(Map map, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().myUserGoods(map);
        subscibe(observable, ideaObserver);
    }

    public void underGoods(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().underGoods(map);
        subscibe(observable, ideaObserver);
    }

    public void deleteGoods(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().deleteGoods(map);
        subscibe(observable, ideaObserver);
    }

    public void ygtList(Map map, IdeaObserver ideaObserver) {
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().ygtList(map);
        subscibe(observable, ideaObserver);
    }


    public void releaseWd2(Map params, String[] STR, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseWd2(params, STR);
        subscibe(observable, ideaObserver);

    }

    public void addGallay(Map params, String[] STR, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().addGallay(params, STR);
        subscibe(observable, ideaObserver);

    }

    public void advice(Map params, String[] STR, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().advice(params, STR);
        subscibe(observable, ideaObserver);

    }

    public void releaseGoods(Map params, String[] STR, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseGoods(params, STR);
        subscibe(observable, ideaObserver);
    }


    public void top(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().top(params);
        subscibe(observable, ideaObserver);
    }

    public void lifeTop(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().lifeTop(params);
        subscibe(observable, ideaObserver);
    }


    public void wdTop(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().wdTop(params);
        subscibe(observable, ideaObserver);
    }


    public void vedioTop(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().vedioTop(params);
        subscibe(observable, ideaObserver);
    }

    public void ygtGoodsDetail(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtGoodsDetail(params);
        subscibe(observable, ideaObserver);
    }

    public void ygtDelGoods(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtDelGoods(params);
        subscibe(observable, ideaObserver);
    }


    public void doFollow(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().doFollow(params);
        subscibe(observable, ideaObserver);
    }

    public void cancelFollow(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().cancelFollow(params);
        subscibe(observable, ideaObserver);
    }

    public void cancelCollect(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().cancelCollect(params);
        subscibe(observable, ideaObserver);
    }

    public void collect(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().collect(params);
        subscibe(observable, ideaObserver);
    }

    public void collectList(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().collectList(params);
        subscibe(observable, ideaObserver);
    }

    public void releaseTz(Map params, String[] STR, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseTz(params, STR);
        subscibe(observable, ideaObserver);
    }

    public void submitWork(Map<String, RequestBody> params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().submitWork(params);
        subscibe(observable, ideaObserver);
    }

    public void releaseActivity(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseActivity(params);
        subscibe(observable, ideaObserver);
    }

    public void releaseTrain(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseTrain(params);
        subscibe(observable, ideaObserver);
    }

    public void ygtDetailList(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtDetailList(params);
        subscibe(observable, ideaObserver);
    }

    public void sygtetSeque(Map params, List<String> orderId, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().sygtetSeque(params, orderId);
        subscibe(observable, ideaObserver);
    }

    public void ygtFreeDetailList(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtFreeDetailList(params);
        subscibe(observable, ideaObserver);
    }

    public void syncYgt(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().syncYgt(params);
        subscibe(observable, ideaObserver);
    }

    public void syncSys(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().syncSys(params);
        subscibe(observable, ideaObserver);
    }

    public void createCode(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().createCode(params);
        subscibe(observable, ideaObserver);
    }

    public void getGoodsType(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getGoodsType(params);
        subscibe(observable, ideaObserver);
    }

    public void dataCategory(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().dataCategory(params);
        subscibe(observable, ideaObserver);
    }

    public void getWorkTyep(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getWorkTyep(params);
        subscibe(observable, ideaObserver);
    }

    public void getEducationType(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getEducationType(params);
        subscibe(observable, ideaObserver);
    }

    public void getExperienceType(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getExperienceType(params);
        subscibe(observable, ideaObserver);
    }

    public void getTimeType(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getTimeType(params);
        subscibe(observable, ideaObserver);
    }

    public void getRewardType(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getRewardType(params);
        subscibe(observable, ideaObserver);
    }

    public void getSalaryType(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getSalaryType(params);
        subscibe(observable, ideaObserver);
    }

    public void videoLifeList(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().videoLifeList(params);
        subscibe(observable, ideaObserver);
    }

    public void releaseYgt(Map params, List<String> prices, List<String> priceOptions, List<String> imgDatas, List<String> removeImg, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseYgt(params, prices, priceOptions, imgDatas, removeImg);
        subscibe(observable, ideaObserver);
    }


    public void payYgt(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().payYgt(params);
        subscibe(observable, ideaObserver);
    }


    public void ygtVideoList(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtVideoList(params);
        subscibe(observable, ideaObserver);
    }

    public void ygtRecoder(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtRecoder(params);
        subscibe(observable, ideaObserver);
    }

    public void ygtGallery(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtGallery(params);
        subscibe(observable, ideaObserver);
    }

    public void deleteYgtGallery(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().deleteYgtGallery(params);
        subscibe(observable, ideaObserver);
    }

    public void savePosition(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().savePosition(params);
        subscibe(observable, ideaObserver);
    }

    public void wxPay(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().wxPay(params);
        subscibe(observable, ideaObserver);
    }

    public void userWollet(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().userWollet(params);
        subscibe(observable, ideaObserver);
    }

    public void userReflect(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().userReflect(params);
        subscibe(observable, ideaObserver);
    }

    public void topListNews(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().topListNews(params);
        subscibe(observable, ideaObserver);
    }

    public void dataDetail(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().dataDetail(params);
        subscibe(observable, ideaObserver);
    }

    public void topLineDataDetail(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().topLineDataDetail(params);
        subscibe(observable, ideaObserver);
    }

    public void materialDetail(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().materialDetail(params);
        subscibe(observable, ideaObserver);
    }

    public void dataLists(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().dataLists(params);
        subscibe(observable, ideaObserver);
    }

    public void listNews(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().listNews(params);
        subscibe(observable, ideaObserver);
    }

    public void releaseVideoFile(Map<String, RequestBody> params, IdeaObserver ideaObserver) {
//        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseVideoFile(params);
        subscibe(observable, ideaObserver);
    }

    public void ygtReleaseVideoFile(Map<String, RequestBody> params, IdeaObserver ideaObserver) {
//        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtReleaseVideoFile(params);
        subscibe(observable, ideaObserver);
    }

    public void releaseVideo(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseVideo(params);
        subscibe(observable, ideaObserver);
    }

    public void downImg(String urlPath, Observer ideaObserver) {
        Observable observable = IdeaApi.getApiService().downloadPicFromNet(urlPath);

//        subscibe(observable, ideaObserver);
        observable.subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(ideaObserver);
    }

    public void ygtReleaseVideo(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().ygtReleaseVideo(params);
        subscibe(observable, ideaObserver);
    }


    public void releaseWork(Map params, String[] img, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().releaseWork(params, img);
        subscibe(observable, ideaObserver);
    }

    public void getVita(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().getVita(params);
        subscibe(observable, ideaObserver);
    }

    public void getWxPayData(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getWxPayData(params);
        subscibe(observable, ideaObserver);
    }

    public void wdCommenLists(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().commenLists(params);
        subscibe(observable, ideaObserver);
    }

    public void inviteList(Map params, IdeaObserver ideaObserver) {
        Observable observable = IdeaApi.getApiService().inviteList(params);
        subscibe(observable, ideaObserver);
    }

    public void delInvite(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().delInvite(params);
        subscibe(observable, ideaObserver);
    }

    public void inviteDetail(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().inviteDetail(params);
        subscibe(observable, ideaObserver);
    }

    public void applyInvite(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().applyInvite(params);
        subscibe(observable, ideaObserver);
    }

    public void delForum(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().delForum(params);
        subscibe(observable, ideaObserver);
    }

    public void delVideoLife(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().delVideoLife(params);
        subscibe(observable, ideaObserver);
    }

    public void sygtDelVideo(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().sygtDelVideo(params);
        subscibe(observable, ideaObserver);
    }

    public void delCase(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().delCase(params);
        subscibe(observable, ideaObserver);
    }

    public void delActivity(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().delActivity(params);
        subscibe(observable, ideaObserver);
    }

    public void delTrain(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().delTrain(params);
        subscibe(observable, ideaObserver);
    }

    public void getRongToken(IdeaObserver ideaObserver) {
        Map map = new HashMap();
        addCommonData(map);
        Observable observable = IdeaApi.getApiService().getRongToken(map);
        subscibe(observable, ideaObserver);
    }

    public void getPersonDetail(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().getPersonDetail(params);
        subscibe(observable, ideaObserver);
    }

    public void goodsCommenLists(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().goodsCommenLists(params);
        subscibe(observable, ideaObserver);
    }

    public void trainCommentLists(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().trainCommentLists(params);
        subscibe(observable, ideaObserver);
    }

    public void lifeCommentLists(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().lifeCommentLists(params);
        subscibe(observable, ideaObserver);
    }

    public void tzCommenLists(Map params, IdeaObserver ideaObserver) {
        addCommonData(params);
        Observable observable = IdeaApi.getApiService().commenTzLists(params);
        subscibe(observable, ideaObserver);
    }

    private void addCommonData(Map map) {
        map.put("token", SPUtils.getToken());
        map.put("userId", SPUtils.getUserID());
        map.put("accid", MyApplication.getAnroidId());
    }

    private void subscibe(Observable observable, Observer ideaObserver) {
        observable.subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(ideaObserver);

    }


}
